// Forms 表单

.form-group {
	&.form-group-margin-less,
	&.form-group-last {
		margin-bottom: 0;
	}

	label {
		font-weight: 400;
	}

	.invalid-feedback,
	.valid-feedback {
		font-weight: 400;	
	}

	.form-text {
		font-size: .9rem;
	}

	// Space sizing
	&.form-group-md {
		margin-bottom: .75rem;
	}

	&.form-group-sm {
		margin-bottom: .5rem;
	}

	&.form-group-xs {
		margin-bottom: .25rem;
	}

	&.form-group-last {
		margin-bottom: 0;
	}

	.valid-feedback,
	.invalid-feedback {
		position: absolute;
		z-index: 1;
		top: -27px;
		min-height: 19px;
		padding: 1px 5px 0;
		color: #fff !important;
		width: auto;
		max-width: none;
		background: $danger;
		border-radius: 2px;
		-webkit-box-shadow: 0 5px 10px #dedede;
		box-shadow: 0 5px 10px #dedede;
	}

	.valid-feedback:after,
	.invalid-feedback:after {
		border: 6px solid transparent;
		border-top-color: $danger;
		content: "";
		height: 0;
		left: 15px;
		position: absolute;
		top: 18px;
	}
}

.form-control {
	color: #6c7293;
	&:focus,
	&:active {
		box-shadow:none !important;
	}

	&[readonly] {
		background-color: $input-readonly-bg;
	}
	  
	// 胶囊风格
	&.form-control-pill {
		border-radius: 50px;
	}
}

// 输入框组
.input-group {
	@include e-icons-size((lineawesome: 1.4rem, fontawesome: 1.2rem, flaticon: 1.2rem));

	i {
		color: $input-group-icon-color;
		line-height: 0;
	}

	.form-control.is-valid + .input-group-append,
	.form-control.is-invalid + .input-group-append {
		margin-left: 0;
	}

	.input-group-prepend + .form-control.is-valid,
	.input-group-prepend + .form-control.is-invalid {
		margin-left: 1px;
	}
}

// 验证失败时显示错误提示
.validated {
	.valid-feedback,
	.invalid-feedback {
		display: block;
	}
}